package cmd

import (
	"fmt"

	"gitee.com/eeppee_admin/go-tuiftp/internal/service/ls"
)

// 实现IOperation接口
type TLsOperation struct{}

func (l *TLsOperation) ArgsValidation(args []string) error {
	if len(args) == 0 {
		return fmt.Errorf("远程路径不能为空")
	}
	return nil
}

func (l *TLsOperation) Execute(args []string) error {
	if len(args) == 0 {
		return fmt.Errorf("请输入远程路径")
	}
	ls.LsTUI(args[0])
	return nil
}
